package com.jishuo.nontax.bean.vo;

import com.jishuo.nontax.bean.message.SetPunishinfoDetail;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;


/**
 * @author hlp
 * @email 1459875748@qq.com
 * @date 2023-02-02 10:13:13
 */
@Data
public class PunishDetailInfoVO implements Serializable {
    //主单流水号
    private Long punishinfoid;
    //收款时间
    private String paybankdt;
    //收款金额
    private BigDecimal amt;
    //交易流水号
    private String bankaffirm;
    //附言
    private String postscript;
    //备注
    private String remarks;
    //代理银行ID
    private Long bankid;
    //是否记账
    private Integer isaccount;
    //记账时间
    private String accountdate;
    //是否待查确认
    private Integer datasource;

    public PunishDetailInfoVO() {
    }

    // 从SetPunishinfoDetail获取数据
    public PunishDetailInfoVO(SetPunishinfoDetail detail) {
        this.paybankdt = detail.getPaybankdt();
        this.amt = new BigDecimal(detail.getAmt());
        this.bankaffirm = detail.getBankaffirm();
        this.postscript = detail.getPostscript();
        this.remarks = detail.getRemarks();
    }

    //返回SetPunishinfoDetail类
    public SetPunishinfoDetail getPunishinfoDetail() {
        SetPunishinfoDetail detail = new SetPunishinfoDetail();
        detail.setBankaffirm(this.bankaffirm);
        detail.setPaybankdt(this.paybankdt);
        detail.setAmt(this.amt.toPlainString());
        detail.setPostscript(this.getPostscript());
        detail.setRemarks(this.remarks);
        return detail;
    }


}
